Pico LoRaGateway (Miromico)
This service is used to configure and manage the Pico LoRaGateway from Miromico.
The Pico LoRaGateway from Miromico can be installed on the "Services" tab within the DINGO-Manager. The service can also be installed from a SSH terminal with this command: sudo sh -c "$(curl -s http://apps.control2net.com/apt/install-miromico-pico-packet-forwarder)"
The Pico LoRaGateway is a packet forwarder that will communicate with a LoRa-concentrator and forward the LoRa-packets to a LoRaWAN server. The Pico LoRaGateway from Miromico is used together with the Miromico-concentrator.
Name: Pico LoRaGateway (Miromico)
Tag: LoRa
Description: https://clarion.miromico.ch/p3111_miromico_picogw-card/hal9000/-/tree/integration/picoGW_packet_forwarder
Type: Systemd
Configuration file: /opt/miromico/hal9000/picoGW_packet_forwarder/lora_pkt_fwd/global_conf.json
Log command: journalctl -u miromico-pico-packet-forwarder.service -n 100
Install command: sudo sh -c "$(curl -s http://apps.control2net.com/apt/install-miromico-pico-packet-forwarder)"
Service name: miromico-pico-packet-forwarder.service
Configuration
Go through the following steps to configure the Miromico-packet-forwarder and Miromico-concentrator-card.
The Miromico-concentrator-card, has currently a problem in the USB-stack of its firmware, that causes it to freeze, when the Miromico-packet-forwarder is stopped. To solve this problem, a workaround is in place, that will reboot the DINGO device, if the Miromico-packet-forwarder service stops.
If the user wants to stop the service, then the service should be disabled first before stopping it. This will not start it again after a reboot.
-
Set unique gateway ID
The Miromico-concentrator card has a unique ID. This ID needs to be set as the gateway_ID in the configuration of the Miromico-packet-forwarder.
Reading the ID from the card must be done from a SSH terminal. We recommend using Putty (https://www.putty.org/).
Connect to the DINGO device via SSH terminal and follow these instructions:
- Run this command: sudo /opt/miromico/hal9000/picoGW_hal/util_chip_id/util_chip_id
-
Internal or external antenna
The Miromico-concentrator cards stores the antenna selection in their (non volatile) flash memory. It is possible with a simple command line tool to switch between the internal/external antenna. The card is set to use the internal antenna as default.
Setting the antenna options must be done from a SSH terminal. We recommend using Putty (https://www.putty.org/).
Connect to the DINGO device via SSH terminal and follow these instructions:
-
Run one of these commands to set the antenna options:
-
Switch to external antenna:
sudo /opt/miromico/hal9000/picoGW_hal/util_settings/util_settings -w 1,1,0
-
Switch to internal antenna:
sudo /opt/miromico/hal9000/picoGW_hal/util_settings/util_settings -w 0,1,0
-
Read current valueTo read the current value, run the command without parameters: sudo /opt/miromico/hal9000/picoGW_hal/util_settings/util_settings
The result will look like this:
datavalid: 1ant: 1led select: 1led function: 0Note : USB port closedWhere ant: 1 means external antenna and ant: 0 means internal antenna.
Here are the available command options for util_settings:
- -h print this help
-
-d <path> COM device to be used to access the concentrator board
=> default path: /dev/ttyACM0
-
-w <ant>,<led_select>,<led_tx>
where <ant> [0|1] internal(0) or external (1) antenna
<led_select> [0|1] use LED_WWAN (0) or LED_WPAN (1)
<led_tx> [0|1] LED on TX (0) or via GPIO (1)
- without -w parameter: Just print out the current values.
-
-
Configure packet forwarder
To configure the packet forwarder; select the appropriate service and click the "Main config. file..." button. See screenshot.
Amongst the configuration items are:
- lbt_enable (listen before talk), enables or disables the listen-before-talk feature.
-
gateway_ID, a unique identifier of this gateway.
- server_address, where the packets should be forwarded to e,g, IP address, localhost etc. Setting the server address to the network adapter name (eth0, eth1 etc.) will make the packet forwarder use the IP on that network adapter.
- serv_port_up, the port on the server where the packets should be forwarded to.
- serv_port_down, the port where the receiving server can send messages back.
Note: When using the packet forwarder, together with the DINGO LoRaWAN Server on the same machine, it is important to set the server_address to the exact same IP as defined in host in the DINGO LoRaWAN Server configuration. E.g. 127.0.0.1Remember: When the configuration is done, select the appropriate service and click the "Stop" button. When stopped, then click the "Start" button, so that the configurations can take effect. Using the "Restart" button has shown NOT to work as expected - resources seem to be suspended.Tip: If there are DNS problems, resolving hostnames on the local network to IP address, then try appending .local to the hostname. This uses the multicast DNS, which is supported on Raspbian systems.
Link to the official page: https://miromico.ch
Development: https://clarion.miromico.ch/p3111_miromico_picogw-card/hal9000/-/blob/integration/INTEGRATION.md